package com.topone.service.impl;

import com.topone.dataObject.ShopApply;
import com.topone.repository.ShopApplyRepository;
import com.topone.service.ShopApplyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/12/17,0017.
 */
@Service
@Slf4j
public class ShopApplyServiceImpl implements ShopApplyService {

    @Autowired
    private ShopApplyRepository repository;
    @Override
    public ShopApply save(ShopApply shopApply) {

        return repository.save(shopApply);
    }

    @Override
    public Page<ShopApply> findUpAll(Integer applyStatus, Pageable pageable) {
        return repository.findByApplyStatus(applyStatus,pageable);
    }

    @Override
    public ShopApply findOne(String shopId) {
        return repository.getOne(shopId);
    }

    @Override
    public Page<ShopApply> findAll(Pageable pageable) {
        return repository.findAll(pageable);
    }

    @Override
    public List<ShopApply> findALlInfo() {
        return repository.findAll();
    }
}
